<%@ page language = "java" import = "java.util.*" import = 
"javax.servlet.http.Cookie" %>

<%@ include file = "header.jspf" %>

<html>
<title>checking login...</title>
<link rel="Stylesheet" type="text/css" media="Screen" charset="utf-8" href="css/common.css"/>
<body>
<h1>checking login...</h1>

<%
String username = request.getParameter("username");
String password = request.getParameter("password");

sessionID = a.siteLogin(username,password);

if(sessionID > 0)
{

  /* The cookie used by this site to track user sessions is called
     SOFTCORE_SESSION. There should never be more than one copy of
     it on a single browser.
  */

  Cookie sessionCookie = new Cookie("SOFTCORE_SESSION",sessionID.toString());
  sessionCookie.setMaxAge(7200);	//set a 2 hour timeout
  response.addCookie(sessionCookie);	//send the cookie
%>

  <br>login successful...
  <meta http-equiv=REFRESH content=0;url=index.jsp>

<%
}

else
{
%>

  Error, bad username and/or password.

<%
}

%>

</body>
</html>
